<?php
/*
 * estudo de padrões de projetos com php
 * author: fabricio s costa
 * version: 1.0
 * site: http://fabriciojf.com
 */
//segurança
require_once('com/fabriciojf/security/Permission.class.php');
require_once('com/fabriciojf/include/Menu.class.php');
require_once('smarty/SmartyInclude.php');

Permission::requireInRole(array('admin','usuario'));

$menusuperior =
'<div class="menusuperior">' .
'    <a href="do.php?action=Home" class="menuesquerdo">Home</a>&nbsp;>' .
'    <a href="do.php?action=PainelControle">Painel de Controle</a>&nbsp;>' .
'    <a href="do.php?action=TicketListar">Listar Tickets</a>&nbsp;>' .
'    <a href="do.php?action=TicketAbrir&idTicket='.$_POST['idTicket'].'">Dados do Chamado</a>&nbsp;>&nbsp;Nova Mensagem' .
'    <a href="do.php?action=Logout" class="menudireito">Logout</a>' .
'    <div class="clear"></div> ' .
'</div>';

// instancia um objeto smarty padrão
$smarty = SmartyInclude::getSmarty();

// carrega o template
/* menu */
$smarty->assign('menuon',  Menu::getMenuOn());
$smarty->assign('menupost', Menu::getMenuPost());
$smarty->assign('menupage', Menu::getMenuPages());
$smarty->assign('menuticket', Menu::getMenuTicket());
$smarty->assign('menusuperior', Menu::getMenuSuperior());
$smarty->assign('menupostinativos', Menu::getMenuPostInativos());

$smarty->assign('idTicket', $_POST['idTicket']);
$smarty->display('HistCriar.tpl');

?>
